﻿using MailManagementWebService.Model.Responses;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace MailManagementWebService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IMailService
    {

        [OperationContract]        
        [WebInvoke(Method = "GET", UriTemplate = "/GetMail?name={keyWords}")]
        Stream GetMails(string keyWords);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "/GetMailInfo?name={keyWords}")]
        string GetMailInfo(string keyWords);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "/")]
        PostResponse PostRequest(Stream postData);
    }
}
